package com.ontheroad.mysql.logs.service;

import java.util.Date;
import java.util.HashMap;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.modoumama.service.base.impl.BaseServiceImpl;

import com.ontheroad.logs.model.UserControlEntity;
import com.ontheroad.logs.service.UserControlService;
import com.ontheroad.mysql.logs.mapper.UserControlMapper;
import com.ontheroad.utils.UUIDUtil;

/*import com.ontheroad.utils.SmsUtil;*/

/**
 * Created by kedong on 2017/6/25 0021.
 */
@Service
@Transactional
public class UserControlServiceImpl extends BaseServiceImpl<UserControlEntity, String>
		implements UserControlService {

	private Logger log = LoggerFactory.getLogger(getClass());
	
	@Autowired
	private UserControlMapper userControlMapper;

	public HashMap<String, Object> insertUserControl(
			UserControlEntity userControlEntity) throws Exception {
		HashMap<String, Object> bean  =new HashMap<String, Object>();
		log.info("添加用户指令信息");
		userControlEntity.setId(UUIDUtil.generate());
		userControlEntity.setCreateTime(new Date());
		userControlMapper.insertModel(userControlEntity);
		bean.put("code", 0);
		bean.put("message", "success");
		return bean;
	}
}
